package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.AttendWhitelistAddDTO;
import org.jsola.hr.dto.AttendWhitelistUpdateDTO;
import org.jsola.hr.query.AttendWhitelistQuery;
import org.jsola.hr.vo.AttendWhitelistListVO;
import org.jsola.hr.vo.AttendWhitelistVO;

import java.util.List;

/**
 * @author zhr
 */
@Api(tags = "hr-考勤白名单")
public interface IAttendWhitelistControllerAPI {

    /**
     * 新增考勤白名单
     * @param attendWhitelistAddDTO 考勤白名单新增实体
     * @return 考勤白名单展示对象
     */
    @ApiOperation(value = "新增考勤白名单")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendWhitelistAddDTO", dataType = "AttendWhitelistAddDTO", value = "新增考勤白名单", paramType = "body")
    })
    Result<AttendWhitelistVO> save(AttendWhitelistAddDTO attendWhitelistAddDTO);


    /**
     * 修改考勤白名单
     * @param attendWhitelistUpdateDTO 考勤白名单
     * @return 更新数量
     */
    @ApiOperation(value = "修改考勤白名单")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendWhitelistUpdateDTO", dataType = "AttendWhitelistUpdateDTO", value = "修改考勤白名单", paramType = "body")
    })
    Result<Integer> update(AttendWhitelistUpdateDTO attendWhitelistUpdateDTO);




    /**
     * 删除单个考勤白名单，彻底删除
     * @param attendWhitelistId 考勤白名单id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个考勤白名单，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendWhitelistId", dataType = "String", value = "考勤白名单id", paramType = "path")
    })
    Result<Integer> delete(String attendWhitelistId);


    /**
     * 批量删除考勤白名单，彻底删除
     * @param attendWhitelistIds 考勤白名单id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除考勤白名单，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendWhitelistIds", dataType = "String[]", value = "考勤白名单id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] attendWhitelistIds);


    /**
     * 根据考勤白名单id查询考勤白名单详情
     * @param attendWhitelistId 考勤白名单id
     * @return 考勤白名单详情
     */
    @ApiOperation(value="根据考勤白名单id查询考勤白名单详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendWhitelistId", dataType = "String", value = "考勤白名单id", paramType = "path")
    })
    Result<AttendWhitelistVO> findById(String attendWhitelistId);


    /**
     * 查询考勤白名单
     * @param attendWhitelistQuery 考勤白名单查询参数
     * @return page
     */
    @ApiOperation(value="查询考勤白名单")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendWhitelistQuery", dataType = "AttendWhitelistQuery", value = "考勤白名单查询参数", paramType = "query")
    })
    Result<List<AttendWhitelistListVO>> listAll(AttendWhitelistQuery attendWhitelistQuery);


     /**
     * 分页查询考勤白名单
     * @param attendWhitelistQuery 考勤白名单查询参数
     * @return page
     */
    @ApiOperation(value="分页查询考勤白名单")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendWhitelistQuery", dataType = "AttendWhitelistQuery", value = "考勤白名单查询参数", paramType = "query")
    })
    Result<Page<AttendWhitelistListVO>> page(AttendWhitelistQuery attendWhitelistQuery);


}

